package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingProject;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingProjectMapper {


    /**
     * 分页查询
     * @param name
     * @param status
     * @return
     */
    Page<NursingProject> selectByPage(String name, Integer status);

    /**
     * 插入数据
     * @param bean
     */
    int insert(NursingProject bean);

    /**
     * 根据id查询信息
     * @param id
     * @return
     */
    NursingProject selectById(Long id);

    /**
     * 修改护信息
     * @param bean
     */
    void update(NursingProject bean);

    /**
     * 根据id删除
     * @param id
     */
    @Delete("delete from nursing_project where id=#{id}")
    void deleteById(Long id);

    @Select("select * from nursing_project")
    List<NursingProject> list();
}
